<template>
  <div>
    <el-button type="primary" @click="handleLogin">登录</el-button>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";
const router = useRouter();

// 登录
const handleLogin = () => {
  localStorage.setItem("token", "123456");
  router.replace({ path: "/home" });
};
</script>

<style scoped>
</style>